Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP]: Provider components as artifacts #371

Conversation

randomvariable
Copy link
Member

@randomvariable randomvariable commented Nov 9, 2018

What this PR does / why we need it:
Simplifies end-user experience to not require anything other than kustomize, clusterawsadm and clusterctl to stand up a cluster.

Bazel generates a static provider-components.yaml file based on Git tags at release.

TODO:

  • Update tests to use generated artifacts
  • Build-time generated provider components has no AWS creds, so provide new workflow
  • Documentation
  • License headers
  • Fix RBAC annotations
  • Ensure correct artifacts are copied
  • Delete any intermediate, WIP code
  • Get kustomize to work with MachineList, though may not be needed

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #299, #276

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:

TBD: UX update

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 9, 2018
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 9, 2018
@vincepri
Copy link
Member

@randomvariable would this change the development experience from the current workflow? If so, we should probably update the docs or Makefile to make it easier.

@randomvariable
Copy link
Member Author

@vincepri Both DevX and UserX will change, and I need to document both

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: randomvariable

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

MANAGER_IMAGE_TAG ?= 0.0.3
MANAGER_IMAGE ?= $(STABLE_DOCKER_REPO)/$(MANAGER_IMAGE_NAME):$(MANAGER_IMAGE_TAG)
DEV_DOCKER_REPO ?= gcr.io/$(shell gcloud config get-value project)
DEV_MANAGER_IMAGE ?= $(DEV_DOCKER_REPO)/$(MANAGER_IMAGE_NAME):$(MANAGER_IMAGE_TAG)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to add a comment stating that these variables can be overridden?

Makefile Outdated

.PHONY: release-binaries
release-binaries: ## Build release binaries
bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //cmd/clusterctl //cmd/clusterawsadm
bazel build --platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64 //cmd/clusterctl //cmd/clusterawsadm
bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64,@io_bazel_rules_go//go/toolchain:darwin_amd64 //cmd/clusterctl //cmd/clusterawsadm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! is this new in bazel? Last time I tried to parse the docs it looked like --platforms would only take a singular value.

Makefile Outdated
@@ -99,32 +88,33 @@ release-binaries: ## Build release binaries
test: generate verify ## Run tests
bazel test --nosandbox_debug //pkg/... //cmd/... $(BAZEL_ARGS)

.PHONY: install-dev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be install-dev-binaries instead? It might be a good idea to add dependencies here on the clusterctl and clusterawsadm binaries to ensure that it is installing an up to date build.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are using -dev as a suffix, so I'd recommend install-binaries-dev (like docker-push-dev)

.PHONY: docker-push
docker-push: generate ## Push production docker image
docker-push: generate provider-components ## Push production docker image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I missing the provider-components target? I only see provider-components-dev added

template:
spec:
containers:
- image: gcr.io/cluster-provider-ssh-rv/cluster-api-aws-controller:0.0.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like an odd value to have embedded here, should this be templated instead?

@randomvariable randomvariable force-pushed the provider-components-artifacts branch from e87df1a to acd6dbc Compare February 1, 2019 13:17
@k8s-ci-robot
Copy link
Contributor

@randomvariable: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-cluster-api-provider-aws-bazel-verify acd6dbc link /test pull-cluster-api-provider-aws-bazel-verify
pull-cluster-api-provider-aws-bazel-build acd6dbc link /test pull-cluster-api-provider-aws-bazel-build
pull-cluster-api-provider-aws-bazel-test acd6dbc link /test pull-cluster-api-provider-aws-bazel-test
pull-cluster-api-provider-aws-bazel-e2e acd6dbc link /test pull-cluster-api-provider-aws-bazel-e2e
pull-cluster-api-provider-aws-verify-boilerplate acd6dbc link /test pull-cluster-api-provider-aws-verify-boilerplate

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm honestly pretty concerned at the amount of changes this PR is carrying. I'd like to make sure we are solving an actual problem and find the right solution. In general, it seems like a very complicated approach without many benefits.

If the goal is to provide components as artifact, can it be added to the release workflow? Could we also split the changes in multiple parts making sure each is self-contained?

@randomvariable
Copy link
Member Author

@vincepri - Intention is to split this out when there was a chunk of Bazel that worked together and wouldn't get deleted and rewritten almost immediately.

#543 is the first of these.

@randomvariable
Copy link
Member Author

Superseded by #580

@randomvariable randomvariable deleted the provider-components-artifacts branch May 26, 2020 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove requirement for GNU Make, envsubst & gettext for end-user experience
5 participants